package com.zss.service.impl;

import com.zss.bean.Product;
import com.zss.dao.ProductDao;
import com.zss.dao.impl.ProductDaoImpl;
import com.zss.service.ProductService;

import java.util.ArrayList;

public class ProductServiceImpl implements ProductService {
    private ProductDao productDao=new ProductDaoImpl();
    @Override
    public ArrayList<Product> selectList() {
        return productDao.selectList();
    }

    @Override
    public boolean addProduct(String productName, double price, String description) {
        return productDao.addProduct(productName,price,description);
    }

    @Override
    public boolean delProduct(long id) {
        return productDao.delProduct(id);
    }

    @Override
    public boolean updProduct(Product product) {
        return productDao.updProduct(product);
    }
}
